package com.tbit.uqbike.client.ordertrace;

import lombok.Data;

/**
 * 订单状态机事件处理结果
 *
 *
 * @author <a href="mailto:chen.chaoxiong@tbit.com.cn">ChenChaoXiong</a>
 * @since 2024/7/2
 */
@Data
public class EventHandleResult {

    private boolean accept;

    private String msg;

    public static EventHandleResult accept() {
        EventHandleResult result = new EventHandleResult();
        result.setAccept(true);
        return result;
    }

    public static EventHandleResult reject(String msg) {
        EventHandleResult result = new EventHandleResult();
        result.setAccept(false);
        result.setMsg(msg);
        return result;
    }

    public boolean isAccept() {
        return accept;
    }
}
